﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BHXH.LinqRepository
{
    public class CauHoiDapAnRepository : Repository<CauHoi_DA>
    {
        public CauHoi_DA GetByLoaiPhieu_MaCau(string loaiPhieu, int maCau, int levelTraLoi)
        {
            //DanhMucCauHoi_DA dm = Filter(string.Format("LoaiPhieu = '{0}' AND MaCau = {1} AND LevelTraLoi = {2}", loaiPhieu, maCau, levelTraLoi));
            return dataContext.CauHoi_DAs.Where(c => c.LoaiPhieu == loaiPhieu && c.MaCau == maCau && c.LevelTraLoi == levelTraLoi).FirstOrDefault();
        }
    }
}
